<?php

namespace app\controller;

use app\Controller;
use app\model\Dict as Model;

class Dict extends Controller
{
    /**
     * 列表.
     * 
     * @return array
     */
    public function index($type = '')
    {
        $result = Model::where('type', $type)->column('value', 'code');
        return json($result);
    }
}
